<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create ('shops', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->uuid ('id')->primary ('id');//uuid主键
            $table->string ('shop_name', 100);//商店名称
            $table->string ('shop_desc', 200);//商店描述
            $table->uuid ('user_id')->unique();//用户uid
            $table->date ('join_date');//加盟日期
            $table->tinyInteger ('shop_status');//商品状态
            $table->timestamps ();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists ('shops');
    }
}
